var HTML_TEMPLATE = window.parent.HTML_TEMPLATE || {
    FORM_TEXT_TPL: FORM_TEXT_TPL.innerHTML,
    FORM_DEPT_TPL: FORM_DEPT_TPL.innerHTML,
    FORM_SELECT_TPL: FORM_SELECT_TPL.innerHTML,
    FORM_BUTTONS_TPL: FORM_BUTTONS_TPL.innerHTML,
    FORM_SWITCH_TPL: FORM_SWITCH_TPL.innerHTML,
    FORM_RADIO_TPL: FORM_RADIO_TPL.innerHTML,
    FORM_TEXTAREA_TPL: FORM_TEXTAREA_TPL.innerHTML,
    FORM_HIDDEN_TPL: FORM_HIDDEN_TPL.innerHTML,
    FORM_DATE_TPL: FORM_DATE_TPL.innerHTML,
    FORM_CUSTOM_TPL: FORM_CUSTOM_TPL.innerHTML,
    FORM_CHECKBOX_TPL: FORM_CHECKBOX_TPL.innerHTML,
    FORM_UPLOADER_TPL: FORM_UPLOADER_TPL.innerHTML
};


//按钮常用图标
var ADP_ICON = {
    add: '<i class="layui-icon">&#xe61f;</i>',
    delete: '<i class="layui-icon">&#x1006;</i>',
    query: '<i class="layui-icon">&#xe615;</i>',
    update: '<i class="layui-icon">&#xe60a;</i>',
    right: '<i class="layui-icon">&#xe602;</i>',
    left: '<i class="layui-icon">&#xe603;</i>',
    down: '<i class="layui-icon">&#xe61a;</i>',
    form: '<i class="layui-icon">&#xe63c;</i>',
    reset: '<i class="layui-icon">&#xe63c;</i>'

};


;(function ($) {
    $("blockquote").attr({
        class: "layui-elem-quote layui-show adp-blockquote"
    });


    if (window.parent.element) {
        window.parent.element.on('tab(demo)', function (data) {
            // var index=data.index;
            // alert($(data.elem).find(".layui-show").find("iframe").attr("src"));
            var $frame = $(data.elem).find(".layui-show").find("iframe");
            var win = $frame[0].contentWindow;
            if (win.onTabRedisplay != undefined) {
                win.onTabRedisplay();
            }

        });
    }





})(jQuery);

var showNotice=window.parent.showNotice

// showNotice("xxx", "<div>eee</div>");
// function guid() {
//     return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
//         var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
//         return v.toString(16);
//     });
// }
//
// if($.cookie("adpcookie")==null){
//     $.cookie('adpcookie', guid());
// }